www.gusucode.com > AspFaq在线帮助系统 V1.0 > AspFaq在线帮助系统 V1.0\code\Js\Function.js
//留言 function Guest(ToUrl,SuStr,GoUrl,FormName){ var options = { url: ToUrl, beforeSubmit:function(formData, jqForm, options){ return true; }, success:function(responseText, statusText){ if(statusText=="success"){ if(responseText.search("成功")>0){ alert(responseText); location.href=GoUrl; } else{ var st=responseText.replace(/\|\|\|\|\|/gi,"\n"); alert(st); } } else{ alert(statusText); } } }; $('#'+FormName+'').ajaxForm(options); } //通用登录表单--跳转 function Form_Send1(ToUrl,SuStr,GoUrl,FormName){ var options = { url: ToUrl, beforeSubmit:function(formData, jqForm, options){ eval("show_go.style.display=\"\";"); return true; }, success:function(responseText, statusText){ if(statusText=="success"){ if(responseText.search("成功")>0){ alert(responseText); location.href=GoUrl; } else{ var st=responseText.replace(/\|\|\|\|\|/gi,"\n"); alert(st); } } else{ alert(statusText); } eval("show_go.style.display=\"none\";"); } }; $('#'+FormName+'').ajaxForm(options); } function Form_Send2(ToUrl,SuStr,FormName){ var options = { url: ToUrl, beforeSubmit:function(formData, jqForm, options){ return true; }, success:function(responseText, statusText){ if(statusText=="success"){ if(responseText.search("成功")>0){ alert(responseText); } else{ var st=responseText.replace(/\|\|\|\|\|/gi,"\n"); alert(st); } } else{ alert(statusText); } } }; $('#'+FormName+'').ajaxForm(options); } //通用删除函数 function DelIt(Cstr,DUrl,GoUrl){ if(confirm(Cstr)) { eval("show_go.style.display=\"\";"); $.get(DUrl, function(data){ alert(data); eval("show_go.style.display=\"none\";"); location.href=GoUrl; return true; } ); } return; } //读取内容 function SetRContent(DivId,Urls){ document.getElementById(DivId).innerHTML="正在生成中!"; $.get(Urls, function(data){ document.getElementById(DivId).innerHTML=data; return true; } ); } //通用不返回提交 function ASend(GoUrl,FUrl){ $.get(FUrl, function(data){ alert(data); location.href=GoUrl; } ); }